﻿namespace HRM.CORE
{
    using DevExpress.Utils;
    using DevExpress.XtraBars;
    using DevExpress.XtraEditors;
    using DevExpress.XtraEditors.Controls;
    using DevExpress.XtraEditors.Repository;
    using DevExpress.XtraGrid;
    using DevExpress.XtraGrid.Columns;
    using DevExpress.XtraGrid.Views.Base;
    using DevExpress.XtraGrid.Views.Card;
    using DevExpress.XtraGrid.Views.Grid;
    using DevExpress.XtraGrid.Views.Grid.ViewInfo;
    using DevExpress.XtraLayout;
    using DevExpress.XtraLayout.Utils;
    using Microsoft.VisualBasic;
    using APP.HELPER;
    using Common.Class; using APP.HELPER.Utils.Language; using Security.Security; using Dictionary.ERP;
    using HRM.CORE;
    using HRM.CORE.REPORT;
    using System; using Extra.ERP;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms; using Common;
    using Security.ERP;
    using Extra.ERP;

    public class xucWork : Common.xucBase
    {
        private Bar bar1;
        private BarDockControl barDockControlBottom;
        private BarDockControl barDockControlLeft;
        private BarDockControl barDockControlRight;
        private BarDockControl barDockControlTop;
        private BarManager barManager1;
        private BarEditItem bbeBeginDate;
        private BarEditItem bbeEndDate;
        private BarButtonItem bbiAddEmployee;
        private BarButtonItem bbiClose;
        private BarButtonItem bbiDelete;
        private SimpleButton bbiDeleteEmployee;
        private BarButtonItem bbiEdit;
        private BarButtonItem bbiExport;
        private BarEditItem bbiFilter;
        private BarButtonItem bbiPrint;
        private BarButtonItem bbiRefresh;
        private SimpleButton bbiSelect;
        private GridColumn colBeginDate;
        private GridColumn colComplete;
        private GridColumn colCost;
        private GridColumn colDeliverer;
        private GridColumn colDelivererName;
        private GridColumn colDescription;
        private GridColumn colEmployeeCode;
        private GridColumn colEmployeeName;
        private GridColumn colEndDate;
        private GridColumn colPriority;
        private GridColumn colStatus;
        private GridColumn colWork;
        private GridColumn colWorkID;
        private IContainer components = null;
        private CardView cvList;
        private GridView gbList;
        private GridControl gcList;
        private GridColumn gridColumn1;
        private GridColumn gridColumn10;
        private GridColumn gridColumn11;
        private GridColumn gridColumn12;
        private GridColumn gridColumn13;
        private GridColumn gridColumn14;
        private GridColumn gridColumn15;
        private GridColumn gridColumn16;
        private GridColumn gridColumn17;
        private GridColumn gridColumn18;
        private GridColumn gridColumn19;
        private GridColumn gridColumn2;
        private GridColumn gridColumn20;
        private GridColumn gridColumn21;
        private GridColumn gridColumn22;
        private GridColumn gridColumn23;
        private GridColumn gridColumn24;
        private GridColumn gridColumn25;
        private GridColumn gridColumn26;
        private GridColumn gridColumn27;
        private GridColumn gridColumn28;
        private GridColumn gridColumn29;
        private GridColumn gridColumn3;
        private GridColumn gridColumn30;
        private GridColumn gridColumn31;
        private GridColumn gridColumn32;
        private GridColumn gridColumn33;
        private GridColumn gridColumn34;
        private GridColumn gridColumn35;
        private GridColumn gridColumn36;
        private GridColumn gridColumn37;
        private GridColumn gridColumn38;
        private GridColumn gridColumn39;
        private GridColumn gridColumn4;
        private GridColumn gridColumn40;
        private GridColumn gridColumn5;
        private GridColumn gridColumn6;
        private GridColumn gridColumn7;
        private GridColumn gridColumn8;
        private GridColumn gridColumn9;
        public DevExpress.Utils.ImageCollection imageCollection2;
        private DevExpress.Utils.ImageCollection imgList;
        private ImageListBoxControl imglsEmployee;
        private LayoutControl layoutControl1;
        private LayoutControlGroup layoutControlGroup1;
        private LayoutControlItem layoutControlItem1;
        private LayoutControlItem layoutControlItem2;
        private LayoutControlItem layoutControlItem3;
        private int m_IndexKey = 1;
        private Guid m_WorkID = Guid.Empty;
        private MemoEdit mmDescription;
        private PanelControl panelControl1;
        private RepositoryItemDateEdit repBeginDate;
        private RepositoryItemCalcEdit repCal;
        private RepositoryItemProgressBar repComplete;
        private RepositoryItemDateEdit repEndDate;
        private RepositoryItemImageComboBox repositoryItemImageComboBox1;
        private RepositoryItemImageComboBox repStatus;
        private RepositoryItemPictureEdit rptPhoto;
        private SplitContainerControl splitContainerControl1;
        private xucSelectEmployees xucSelect;

        public event ClosedHander Closed;

        public xucWork()
        {
            this.InitializeComponent();
            this.InitData();
            this.ReLoad();
        }

        private void Add()
        {
            if (MyRule.IsAdd("bbiWork"))
            {
                xfmWorkAdd add = new xfmWorkAdd(Actions.Add);
                add.Added += new xfmWorkAdd.AddedEventHander(this.frm_Added);
                add.ShowDialog();
            }
        }

        private void AddRow(HRM_WORK item)
        {
            GridView gbList = this.gbList;
            int focusedRowHandle = gbList.FocusedRowHandle;
            gbList.AddNewRow();
            focusedRowHandle = gbList.FocusedRowHandle;
            gbList.SetRowCellValue(focusedRowHandle, "WorkID", item.WorkID);
            gbList.SetRowCellValue(focusedRowHandle, "EmployeeCode", item.EmployeeCode);
            gbList.SetRowCellValue(focusedRowHandle, "EmployeeName", item.EmployeeName);
            gbList.SetRowCellValue(focusedRowHandle, "Deliverer", item.Deliverer);
            gbList.SetRowCellValue(focusedRowHandle, "DelivererName", item.DelivererName);
            gbList.SetRowCellValue(focusedRowHandle, "Work", item.Work);
            gbList.SetRowCellValue(focusedRowHandle, "Priority", item.Priority);
            gbList.SetRowCellValue(focusedRowHandle, "BeginDate", item.BeginDate);
            gbList.SetRowCellValue(focusedRowHandle, "EndDate", item.EndDate);
            gbList.SetRowCellValue(focusedRowHandle, "Status", item.Status);
            gbList.SetRowCellValue(focusedRowHandle, "Complete", item.Complete);
            gbList.SetRowCellValue(focusedRowHandle, "Cost", item.Cost);
            gbList.SetRowCellValue(focusedRowHandle, "Description", item.Description);
            gbList.UpdateCurrentRow();
        }

        private void bbiAddWork_ItemClick(object sender, ItemClickEventArgs e)
        {
            this.Add();
        }

        private void bbiClose_ItemClick(object sender, ItemClickEventArgs e)
        {
            base.ParentForm.Close();
        }

        private void bbiDelete_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (MyRule.IsDelete("bbiWork"))
            {
                bool flag = false;
                int[] selectedRows = this.gbList.GetSelectedRows();
                if (XtraMessageBox.Show("Bạn c\x00f3 muốn x\x00f3a kh\x00f4ng?", "Th\x00f4ng b\x00e1o", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.No)
                {
                    string str;
                    object rowCellValue;
                    base.SetWaitDialogCaption("Đang x\x00f3a...");
                    HRM_WORK hrm_work = new HRM_WORK();
                    for (int i = selectedRows.Length; i > 0; i--)
                    {
                        flag = true;
                        rowCellValue = this.gbList.GetRowCellValue(selectedRows[i - 1], "WorkID");
                        if (rowCellValue != null)
                        {
                            SYS_LOG.Insert("Quản L\x00fd C\x00f4ng Việc", "Xo\x00e1", rowCellValue.ToString());
                            str = hrm_work.Delete(new Guid(rowCellValue.ToString()));
                            if (str == "OK")
                            {
                                this.gbList.DeleteRow(selectedRows[i - 1]);
                            }
                            else if (str != "OK")
                            {
                                MessageBox.Show("Th\x00f4ng tin kh\x00f4ng được x\x00f3a" + str, "Th\x00f4ng b\x00e1o", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                            }
                        }
                    }
                    this.DoHide();
                    if (!flag)
                    {
                        rowCellValue = this.gbList.GetFocusedRowCellValue("WorkID");
                        if (rowCellValue != null)
                        {
                            SYS_LOG.Insert("Quản L\x00fd C\x00f4ng Việc", "Xo\x00e1", rowCellValue.ToString());
                            base.SetWaitDialogCaption("Đang x\x00f3a...");
                            str = hrm_work.Delete(new Guid(rowCellValue.ToString()));
                            if (str == "OK")
                            {
                                this.gbList.DeleteRow(this.gbList.FocusedRowHandle);
                            }
                            else if (str != "OK")
                            {
                                MessageBox.Show("Th\x00f4ng tin kh\x00f4ng được x\x00f3a\r\n" + str, "Th\x00f4ng b\x00e1o", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                            }
                            this.DoHide();
                        }
                    }
                }
            }
        }

        private void bbiDeleteEmployee_Click(object sender, EventArgs e)
        {
            string employeeCode = "";
            employeeCode = this.GetCode(this.imglsEmployee.SelectedItem as ImageListBoxItem);
            try
            {
                HRM_WORK_EMPLOYEE hrm_work_employee = new HRM_WORK_EMPLOYEE();
                if (hrm_work_employee.Exist(this.m_WorkID, employeeCode))
                {
                    hrm_work_employee.Delete(this.m_WorkID, employeeCode);
                }
                else
                {
                    XtraMessageBox.Show("Kh\x00f4ng thể x\x00f3a nh\x00e2n vi\x00ean n\x00e0y ra khỏi danh s\x00e1ch!");
                }
            }
            catch
            {
            }
            this.LoadFocusedData();
        }

        private void bbiEdit_ItemClick(object sender, ItemClickEventArgs e)
        {
            this.Change();
        }

        private void bbiExport_ItemClick(object sender, ItemClickEventArgs e)
        {
            base._exportView = this.gbList;
            SYS_LOG.Insert("Quản L\x00fd C\x00f4ng Việc", "Xuất");
            base.Export();
        }

        private void bbiFilter_EditValueChanged(object sender, EventArgs e)
        {
            this.m_IndexKey = int.Parse(this.bbiFilter.EditValue.ToString());
            if (this.m_IndexKey == 0)
            {
                this.bbeBeginDate.Enabled = false;
                this.bbeEndDate.Enabled = false;
            }
            else
            {
                this.bbeBeginDate.Enabled = true;
                this.bbeEndDate.Enabled = true;
            }
            this.LoadGrid();
        }

        private void bbiPrint_ItemClick(object sender, ItemClickEventArgs e)
        {
            SYS_LOG.Insert("Quản L\x00fd C\x00f4ng Việc", "In");
            new xfmListWork().ShowDialog();
        }

        private void bbiRefresh_ItemClick(object sender, ItemClickEventArgs e)
        {
            this.ReLoad();
        }

        private void bbiSelect_Click(object sender, EventArgs e)
        {
            this.xucSelect = new xucSelectEmployees(1, 0);
            this.xucSelect.Dock = DockStyle.Fill;
            this.xucSelect.Selected += delegate (object s, DataTable d) {
                HRM_WORK_EMPLOYEE hrm_work_employee = new HRM_WORK_EMPLOYEE();
                foreach (DataRow row in d.Rows)
                {
                    if (!hrm_work_employee.Exist(this.m_WorkID, row["EmployeeCode"].ToString()))
                    {
                        hrm_work_employee.Insert(this.m_WorkID, row["EmployeeCode"].ToString());
                    }
                }
                this.LoadFocusedData();
            };
            this.splitContainerControl1.Panel2.Controls.Add(this.xucSelect);
            this.xucSelect.BringToFront();
        }

        private void Change()
        {
            if (MyRule.IsAccess("bbiWork"))
            {
                HRM_WORK item = new HRM_WORK();
                object focusedRowCellValue = this.gbList.GetFocusedRowCellValue("WorkID");
                if (focusedRowCellValue != null)
                {
                    base.SetWaitDialogCaption("Đang kiểm tra dữ liệu....");
                    if (item.Get(new Guid(focusedRowCellValue.ToString())) != "OK")
                    {
                        this.DoHide();
                        XtraMessageBox.Show("Dữ liệu kh\x00f4ng tồn tại", "Th\x00f4ng B\x00e1o", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    }
                    else
                    {
                        this.DoHide();
                        xfmWorkAdd add = new xfmWorkAdd(Actions.Update, item);
                        add.Updated += new xfmWorkAdd.UpdatedEventHander(this.frm_Updated);
                        add.Added += new xfmWorkAdd.AddedEventHander(this.frm_Added);
                        add.ShowDialog();
                    }
                }
            }
        }

        public void DisableMenu(bool disable)
        {
            this.bbiEdit.Enabled = !disable;
            this.bbiDelete.Enabled = !disable;
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        protected void DoShowMenu(GridHitInfo hi)
        {
        }

        private void frm_Added(object sender, HRM_WORK Item)
        {
            this.AddRow(Item);
        }

        private void frm_Updated(object sender, HRM_WORK Item)
        {
            this.UpdateRow(Item);
        }

        private void gbList_CustomDrawRowIndicator(object sender, RowIndicatorCustomDrawEventArgs e)
        {
            if (e.RowHandle == -2147483648)
            {
                e.Handled = true;
                e.Painter.DrawObject(e.Info);
                Rectangle bounds = e.Bounds;
                e.Graphics.FillRectangle(new SolidBrush(Color.FromArgb(0x3f, 0xa5, 0xa5, 0)), bounds);
                bounds.Height--;
                bounds.Width--;
                e.Graphics.DrawRectangle(Pens.Blue, bounds);
            }
            int rowHandle = e.RowHandle;
            if (rowHandle >= 0)
            {
                rowHandle++;
                e.Info.DisplayText = rowHandle.ToString();
            }
        }

        private void gbList_DoubleClick(object sender, EventArgs e)
        {
            if (this.gbList.RowCount != 0)
            {
                this.Change();
            }
        }

        private void gbList_FocusedRowChanged(object sender, FocusedRowChangedEventArgs e)
        {
            this.LoadFocusedData();
        }

        private void gbList_KeyDown(object sender, KeyEventArgs e)
        {
            this.ucList_ListKeyDown(sender, e);
            if ((e.KeyCode == Keys.Delete) && (this.gbList.RowCount != 0))
            {
                this.Delete();
                this.SetMenu(null);
            }
        }

        private void gbList_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                this.DoShowMenu(this.gbList.CalcHitInfo(new Point(e.X, e.Y)));
            }
            this.SetMenu(null);
        }

        private void gbList_RowCellClick(object sender, RowCellClickEventArgs e)
        {
            Common.Class.RowClickEventArgs args = new Common.Class.RowClickEventArgs(e.RowHandle, e.Column.ColumnHandle);
            this.SetMenu(args);
        }

        private string GetCode(ImageListBoxItem item)
        {
            try
            {
                string str = item.Value.ToString();
                char[] separator = new char[] { '(', ')' };
                return str.Split(separator)[1];
            }
            catch
            {
                return "";
            }
        }

        private void InitData()
        {
            System.DateTime now;
            try
            {
                now = DateAndTime.DateAdd(DateInterval.Month, -6.0, System.DateTime.Now);
            }
            catch
            {
                now = System.DateTime.Now;
            }
            this.bbeBeginDate.EditValue = now;
            this.bbeEndDate.EditValue = System.DateTime.Now;
        }

        private void InitializeComponent()
        {
            DevExpress.XtraGrid.StyleFormatCondition styleFormatCondition1 = new DevExpress.XtraGrid.StyleFormatCondition();
            DevExpress.XtraGrid.StyleFormatCondition styleFormatCondition2 = new DevExpress.XtraGrid.StyleFormatCondition();
            DevExpress.XtraGrid.StyleFormatCondition styleFormatCondition3 = new DevExpress.XtraGrid.StyleFormatCondition();
            DevExpress.XtraGrid.StyleFormatCondition styleFormatCondition4 = new DevExpress.XtraGrid.StyleFormatCondition();
            DevExpress.XtraGrid.StyleFormatCondition styleFormatCondition5 = new DevExpress.XtraGrid.StyleFormatCondition();
            DevExpress.XtraGrid.StyleFormatCondition styleFormatCondition6 = new DevExpress.XtraGrid.StyleFormatCondition();
            DevExpress.XtraGrid.StyleFormatCondition styleFormatCondition7 = new DevExpress.XtraGrid.StyleFormatCondition();
            DevExpress.XtraGrid.StyleFormatCondition styleFormatCondition8 = new DevExpress.XtraGrid.StyleFormatCondition();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(xucWork));
            this.gridColumn29 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gcList = new DevExpress.XtraGrid.GridControl();
            this.gbList = new DevExpress.XtraGrid.Views.Grid.GridView();
            this.colWorkID = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colWork = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colPriority = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colBeginDate = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colEndDate = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colStatus = new DevExpress.XtraGrid.Columns.GridColumn();
            this.repStatus = new DevExpress.XtraEditors.Repository.RepositoryItemImageComboBox();
            this.colComplete = new DevExpress.XtraGrid.Columns.GridColumn();
            this.repComplete = new DevExpress.XtraEditors.Repository.RepositoryItemProgressBar();
            this.colCost = new DevExpress.XtraGrid.Columns.GridColumn();
            this.repCal = new DevExpress.XtraEditors.Repository.RepositoryItemCalcEdit();
            this.colEmployeeName = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colDeliverer = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colDelivererName = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colDescription = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colEmployeeCode = new DevExpress.XtraGrid.Columns.GridColumn();
            this.rptPhoto = new DevExpress.XtraEditors.Repository.RepositoryItemPictureEdit();
            this.cvList = new DevExpress.XtraGrid.Views.Card.CardView();
            this.gridColumn21 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn22 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn23 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn24 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn25 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn26 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn27 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn28 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn30 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn31 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn32 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn33 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn34 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn35 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn36 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn37 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn38 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn39 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn40 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn3 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn4 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn5 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn6 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn7 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn8 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn9 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn10 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn11 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn12 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn13 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn14 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn15 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn16 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn17 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn18 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn19 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn20 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.barManager1 = new DevExpress.XtraBars.BarManager();
            this.bar1 = new DevExpress.XtraBars.Bar();
            this.bbiAddEmployee = new DevExpress.XtraBars.BarButtonItem();
            this.bbiEdit = new DevExpress.XtraBars.BarButtonItem();
            this.bbiDelete = new DevExpress.XtraBars.BarButtonItem();
            this.bbiFilter = new DevExpress.XtraBars.BarEditItem();
            this.repositoryItemImageComboBox1 = new DevExpress.XtraEditors.Repository.RepositoryItemImageComboBox();
            this.bbeBeginDate = new DevExpress.XtraBars.BarEditItem();
            this.repBeginDate = new DevExpress.XtraEditors.Repository.RepositoryItemDateEdit();
            this.bbeEndDate = new DevExpress.XtraBars.BarEditItem();
            this.repEndDate = new DevExpress.XtraEditors.Repository.RepositoryItemDateEdit();
            this.bbiPrint = new DevExpress.XtraBars.BarButtonItem();
            this.bbiExport = new DevExpress.XtraBars.BarButtonItem();
            this.bbiRefresh = new DevExpress.XtraBars.BarButtonItem();
            this.bbiClose = new DevExpress.XtraBars.BarButtonItem();
            this.barDockControlTop = new DevExpress.XtraBars.BarDockControl();
            this.barDockControlBottom = new DevExpress.XtraBars.BarDockControl();
            this.barDockControlLeft = new DevExpress.XtraBars.BarDockControl();
            this.barDockControlRight = new DevExpress.XtraBars.BarDockControl();
            this.imageCollection2 = new DevExpress.Utils.ImageCollection();
            this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
            this.imglsEmployee = new DevExpress.XtraEditors.ImageListBoxControl();
            this.imgList = new DevExpress.Utils.ImageCollection();
            this.mmDescription = new DevExpress.XtraEditors.MemoEdit();
            this.panelControl1 = new DevExpress.XtraEditors.PanelControl();
            this.bbiDeleteEmployee = new DevExpress.XtraEditors.SimpleButton();
            this.bbiSelect = new DevExpress.XtraEditors.SimpleButton();
            this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
            this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
            this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
            this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
            this.splitContainerControl1 = new DevExpress.XtraEditors.SplitContainerControl();
            ((System.ComponentModel.ISupportInitialize)(this.gcList)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.gbList)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.repStatus)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.repComplete)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.repCal)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.rptPhoto)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.cvList)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.barManager1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.repositoryItemImageComboBox1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.repBeginDate)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.repBeginDate.CalendarTimeProperties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.repEndDate)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.repEndDate.CalendarTimeProperties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.imageCollection2)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
            this.layoutControl1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.imglsEmployee)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.imgList)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.mmDescription.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.panelControl1)).BeginInit();
            this.panelControl1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1)).BeginInit();
            this.splitContainerControl1.SuspendLayout();
            this.SuspendLayout();
            // 
            // gridColumn29
            // 
            this.gridColumn29.Caption = "Ngày sinh";
            this.gridColumn29.FieldName = "Birthday";
            this.gridColumn29.Name = "gridColumn29";
            this.gridColumn29.OptionsColumn.AllowEdit = false;
            this.gridColumn29.OptionsColumn.ReadOnly = true;
            this.gridColumn29.Visible = true;
            this.gridColumn29.VisibleIndex = 8;
            this.gridColumn29.Width = 66;
            // 
            // gcList
            // 
            this.gcList.Dock = System.Windows.Forms.DockStyle.Fill;
            this.gcList.EmbeddedNavigator.Buttons.Append.Visible = false;
            this.gcList.EmbeddedNavigator.Buttons.CancelEdit.Visible = false;
            this.gcList.EmbeddedNavigator.Buttons.Edit.Visible = false;
            this.gcList.EmbeddedNavigator.Buttons.EndEdit.Visible = false;
            this.gcList.EmbeddedNavigator.Buttons.Remove.Visible = false;
            this.gcList.EmbeddedNavigator.TextStringFormat = "{0}/{1}";
            this.gcList.Location = new System.Drawing.Point(0, 0);
            this.gcList.MainView = this.gbList;
            this.gcList.Name = "gcList";
            this.gcList.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
            this.rptPhoto,
            this.repCal,
            this.repComplete,
            this.repStatus});
            this.gcList.Size = new System.Drawing.Size(726, 594);
            this.gcList.TabIndex = 3;
            this.gcList.UseEmbeddedNavigator = true;
            this.gcList.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
            this.gbList,
            this.cvList});
            // 
            // gbList
            // 
            this.gbList.Appearance.GroupRow.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold);
            this.gbList.Appearance.GroupRow.Options.UseFont = true;
            this.gbList.Appearance.HeaderPanel.Options.UseTextOptions = true;
            this.gbList.Appearance.HeaderPanel.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
            this.gbList.Appearance.HeaderPanel.TextOptions.WordWrap = DevExpress.Utils.WordWrap.Wrap;
            this.gbList.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
            this.gbList.ColumnPanelRowHeight = 32;
            this.gbList.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
            this.colWorkID,
            this.colWork,
            this.colPriority,
            this.colBeginDate,
            this.colEndDate,
            this.colStatus,
            this.colComplete,
            this.colCost,
            this.colEmployeeName,
            this.colDeliverer,
            this.colDelivererName,
            this.colDescription,
            this.colEmployeeCode});
            this.gbList.FixedLineWidth = 1;
            this.gbList.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
            styleFormatCondition1.Appearance.ForeColor = System.Drawing.Color.Blue;
            styleFormatCondition1.Appearance.Options.UseForeColor = true;
            styleFormatCondition1.ApplyToRow = true;
            styleFormatCondition1.Condition = DevExpress.XtraGrid.FormatConditionEnum.Expression;
            styleFormatCondition1.Expression = "[Status] == 0";
            styleFormatCondition2.ApplyToRow = true;
            styleFormatCondition2.Condition = DevExpress.XtraGrid.FormatConditionEnum.Expression;
            styleFormatCondition2.Expression = "[Status] == 1";
            styleFormatCondition3.Appearance.ForeColor = System.Drawing.Color.Green;
            styleFormatCondition3.Appearance.Options.UseForeColor = true;
            styleFormatCondition3.ApplyToRow = true;
            styleFormatCondition3.Condition = DevExpress.XtraGrid.FormatConditionEnum.Expression;
            styleFormatCondition3.Expression = "[Status] ==2";
            styleFormatCondition4.Appearance.ForeColor = System.Drawing.Color.Red;
            styleFormatCondition4.Appearance.Options.UseForeColor = true;
            styleFormatCondition4.Condition = DevExpress.XtraGrid.FormatConditionEnum.Expression;
            styleFormatCondition4.Expression = "[Status]=3";
            this.gbList.FormatConditions.AddRange(new DevExpress.XtraGrid.StyleFormatCondition[] {
            styleFormatCondition1,
            styleFormatCondition2,
            styleFormatCondition3,
            styleFormatCondition4});
            this.gbList.GridControl = this.gcList;
            this.gbList.GroupPanelText = "Kéo và thả cột vào đây để nhóm dữ liệu";
            this.gbList.IndicatorWidth = 40;
            this.gbList.Name = "gbList";
            this.gbList.OptionsBehavior.AllowIncrementalSearch = true;
            this.gbList.OptionsBehavior.AutoExpandAllGroups = true;
            this.gbList.OptionsBehavior.CopyToClipboardWithColumnHeaders = false;
            this.gbList.OptionsBehavior.FocusLeaveOnTab = true;
            this.gbList.OptionsLayout.StoreAllOptions = true;
            this.gbList.OptionsLayout.StoreAppearance = true;
            this.gbList.OptionsMenu.EnableColumnMenu = false;
            this.gbList.OptionsMenu.EnableGroupPanelMenu = false;
            this.gbList.OptionsNavigation.EnterMoveNextColumn = true;
            this.gbList.OptionsSelection.InvertSelection = true;
            this.gbList.OptionsSelection.MultiSelect = true;
            this.gbList.OptionsView.ColumnAutoWidth = false;
            this.gbList.OptionsView.EnableAppearanceEvenRow = true;
            this.gbList.OptionsView.RowAutoHeight = true;
            this.gbList.OptionsView.ShowAutoFilterRow = true;
            this.gbList.RowCellClick += new DevExpress.XtraGrid.Views.Grid.RowCellClickEventHandler(this.gbList_RowCellClick);
            this.gbList.CustomDrawRowIndicator += new DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventHandler(this.gbList_CustomDrawRowIndicator);
            this.gbList.FocusedRowChanged += new DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventHandler(this.gbList_FocusedRowChanged);
            this.gbList.KeyDown += new System.Windows.Forms.KeyEventHandler(this.gbList_KeyDown);
            this.gbList.MouseDown += new System.Windows.Forms.MouseEventHandler(this.gbList_MouseDown);
            this.gbList.DoubleClick += new System.EventHandler(this.gbList_DoubleClick);
            // 
            // colWorkID
            // 
            this.colWorkID.Caption = "ID";
            this.colWorkID.FieldName = "WorkID";
            this.colWorkID.Name = "colWorkID";
            // 
            // colWork
            // 
            this.colWork.Caption = "Công việc";
            this.colWork.FieldName = "Work";
            this.colWork.Name = "colWork";
            this.colWork.OptionsColumn.AllowEdit = false;
            this.colWork.OptionsColumn.ReadOnly = true;
            this.colWork.Visible = true;
            this.colWork.VisibleIndex = 0;
            this.colWork.Width = 271;
            // 
            // colPriority
            // 
            this.colPriority.Caption = "Độ ưu tiên";
            this.colPriority.FieldName = "Priority";
            this.colPriority.Name = "colPriority";
            this.colPriority.OptionsColumn.AllowEdit = false;
            this.colPriority.OptionsColumn.ReadOnly = true;
            this.colPriority.Visible = true;
            this.colPriority.VisibleIndex = 1;
            // 
            // colBeginDate
            // 
            this.colBeginDate.Caption = "Ngày bắt đầu";
            this.colBeginDate.FieldName = "BeginDate";
            this.colBeginDate.Name = "colBeginDate";
            this.colBeginDate.OptionsColumn.AllowEdit = false;
            this.colBeginDate.OptionsColumn.ReadOnly = true;
            this.colBeginDate.Visible = true;
            this.colBeginDate.VisibleIndex = 2;
            // 
            // colEndDate
            // 
            this.colEndDate.Caption = "Ngày kết thúc";
            this.colEndDate.FieldName = "EndDate";
            this.colEndDate.Name = "colEndDate";
            this.colEndDate.OptionsColumn.AllowEdit = false;
            this.colEndDate.OptionsColumn.ReadOnly = true;
            this.colEndDate.Visible = true;
            this.colEndDate.VisibleIndex = 3;
            // 
            // colStatus
            // 
            this.colStatus.Caption = "Trạng thái";
            this.colStatus.ColumnEdit = this.repStatus;
            this.colStatus.FieldName = "Status";
            this.colStatus.Name = "colStatus";
            this.colStatus.OptionsColumn.AllowEdit = false;
            this.colStatus.OptionsColumn.ReadOnly = true;
            this.colStatus.Visible = true;
            this.colStatus.VisibleIndex = 4;
            this.colStatus.Width = 110;
            // 
            // repStatus
            // 
            this.repStatus.AutoHeight = false;
            this.repStatus.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
            this.repStatus.Items.AddRange(new DevExpress.XtraEditors.Controls.ImageComboBoxItem[] {
            new DevExpress.XtraEditors.Controls.ImageComboBoxItem("Chưa bắt đầu", 0, -1),
            new DevExpress.XtraEditors.Controls.ImageComboBoxItem("Đang thực hiện", 1, -1),
            new DevExpress.XtraEditors.Controls.ImageComboBoxItem("Đã hoàn thành", 2, -1),
            new DevExpress.XtraEditors.Controls.ImageComboBoxItem("Đã hủy bỏ", 3, -1)});
            this.repStatus.Name = "repStatus";
            // 
            // colComplete
            // 
            this.colComplete.Caption = "Mức độ hoàn thành";
            this.colComplete.ColumnEdit = this.repComplete;
            this.colComplete.FieldName = "Complete";
            this.colComplete.Name = "colComplete";
            this.colComplete.OptionsColumn.AllowEdit = false;
            this.colComplete.OptionsColumn.ReadOnly = true;
            this.colComplete.Visible = true;
            this.colComplete.VisibleIndex = 5;
            // 
            // repComplete
            // 
            this.repComplete.Name = "repComplete";
            this.repComplete.ShowTitle = true;
            // 
            // colCost
            // 
            this.colCost.Caption = "Chi phí";
            this.colCost.ColumnEdit = this.repCal;
            this.colCost.FieldName = "Cost";
            this.colCost.Name = "colCost";
            this.colCost.OptionsColumn.AllowEdit = false;
            this.colCost.OptionsColumn.ReadOnly = true;
            this.colCost.Visible = true;
            this.colCost.VisibleIndex = 6;
            // 
            // repCal
            // 
            this.repCal.AutoHeight = false;
            this.repCal.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
            this.repCal.Mask.UseMaskAsDisplayFormat = true;
            this.repCal.Name = "repCal";
            // 
            // colEmployeeName
            // 
            this.colEmployeeName.Caption = "Người thực hiện";
            this.colEmployeeName.FieldName = "EmployeeName";
            this.colEmployeeName.Name = "colEmployeeName";
            this.colEmployeeName.OptionsColumn.AllowEdit = false;
            this.colEmployeeName.OptionsColumn.ReadOnly = true;
            this.colEmployeeName.Visible = true;
            this.colEmployeeName.VisibleIndex = 8;
            this.colEmployeeName.Width = 128;
            // 
            // colDeliverer
            // 
            this.colDeliverer.Caption = "Mã người giao";
            this.colDeliverer.FieldName = "Deliverer";
            this.colDeliverer.Name = "colDeliverer";
            this.colDeliverer.OptionsColumn.AllowEdit = false;
            this.colDeliverer.OptionsColumn.ReadOnly = true;
            this.colDeliverer.Width = 119;
            // 
            // colDelivererName
            // 
            this.colDelivererName.Caption = "Người giao";
            this.colDelivererName.FieldName = "DelivererName";
            this.colDelivererName.Name = "colDelivererName";
            this.colDelivererName.OptionsColumn.AllowEdit = false;
            this.colDelivererName.OptionsColumn.ReadOnly = true;
            this.colDelivererName.Visible = true;
            this.colDelivererName.VisibleIndex = 7;
            this.colDelivererName.Width = 147;
            // 
            // colDescription
            // 
            this.colDescription.Caption = "Ghi chú";
            this.colDescription.FieldName = "Description";
            this.colDescription.Name = "colDescription";
            this.colDescription.OptionsColumn.AllowEdit = false;
            this.colDescription.OptionsColumn.ReadOnly = true;
            // 
            // colEmployeeCode
            // 
            this.colEmployeeCode.Caption = "Mã NV";
            this.colEmployeeCode.FieldName = "EmployeeCode";
            this.colEmployeeCode.Name = "colEmployeeCode";
            // 
            // rptPhoto
            // 
            this.rptPhoto.CustomHeight = 48;
            this.rptPhoto.Name = "rptPhoto";
            this.rptPhoto.NullText = "[Chưa chọn hình]";
            this.rptPhoto.SizeMode = DevExpress.XtraEditors.Controls.PictureSizeMode.Zoom;
            // 
            // cvList
            // 
            this.cvList.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
            this.gridColumn21,
            this.gridColumn22,
            this.gridColumn23,
            this.gridColumn24,
            this.gridColumn25,
            this.gridColumn26,
            this.gridColumn27,
            this.gridColumn28,
            this.gridColumn29,
            this.gridColumn30,
            this.gridColumn31,
            this.gridColumn32,
            this.gridColumn33,
            this.gridColumn34,
            this.gridColumn35,
            this.gridColumn36,
            this.gridColumn37,
            this.gridColumn38,
            this.gridColumn39,
            this.gridColumn40});
            this.cvList.FocusedCardTopFieldIndex = 0;
            styleFormatCondition5.Appearance.ForeColor = System.Drawing.Color.Green;
            styleFormatCondition5.Appearance.Options.UseForeColor = true;
            styleFormatCondition5.ApplyToRow = true;
            styleFormatCondition5.Condition = DevExpress.XtraGrid.FormatConditionEnum.Expression;
            styleFormatCondition5.Expression = "[Status] == 0 And [TestToDate] >= UtcNow()";
            styleFormatCondition6.Appearance.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
            styleFormatCondition6.Appearance.Options.UseForeColor = true;
            styleFormatCondition6.ApplyToRow = true;
            styleFormatCondition6.Condition = DevExpress.XtraGrid.FormatConditionEnum.Expression;
            styleFormatCondition6.Expression = "[Status] == 2";
            styleFormatCondition7.Appearance.ForeColor = System.Drawing.Color.Red;
            styleFormatCondition7.Appearance.Options.UseForeColor = true;
            styleFormatCondition7.ApplyToRow = true;
            styleFormatCondition7.Condition = DevExpress.XtraGrid.FormatConditionEnum.Expression;
            styleFormatCondition7.Expression = "[Status] == 3 And [EndDate] <= UtcNow()";
            styleFormatCondition8.Appearance.BackColor = System.Drawing.Color.WhiteSmoke;
            styleFormatCondition8.Appearance.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            styleFormatCondition8.Appearance.Options.UseBackColor = true;
            styleFormatCondition8.Appearance.Options.UseForeColor = true;
            styleFormatCondition8.Column = this.gridColumn29;
            styleFormatCondition8.Condition = DevExpress.XtraGrid.FormatConditionEnum.Expression;
            styleFormatCondition8.Expression = "GetDay([Birthday]) ==GetDay(UtcNow()) And GetMonth([Birthday]) ==GetMonth(UtcNow(" +
    "))";
            this.cvList.FormatConditions.AddRange(new DevExpress.XtraGrid.StyleFormatCondition[] {
            styleFormatCondition5,
            styleFormatCondition6,
            styleFormatCondition7,
            styleFormatCondition8});
            this.cvList.GridControl = this.gcList;
            this.cvList.Name = "cvList";
            this.cvList.OptionsBehavior.FocusLeaveOnTab = true;
            this.cvList.OptionsLayout.StoreAllOptions = true;
            this.cvList.OptionsLayout.StoreAppearance = true;
            this.cvList.OptionsSelection.MultiSelect = true;
            this.cvList.VertScrollVisibility = DevExpress.XtraGrid.Views.Base.ScrollVisibility.Auto;
            // 
            // gridColumn21
            // 
            this.gridColumn21.Caption = "Chi nhánh";
            this.gridColumn21.FieldName = "BranchName";
            this.gridColumn21.Name = "gridColumn21";
            this.gridColumn21.Visible = true;
            this.gridColumn21.VisibleIndex = 0;
            // 
            // gridColumn22
            // 
            this.gridColumn22.Caption = "Phòng ban";
            this.gridColumn22.FieldName = "DepartmentName";
            this.gridColumn22.Name = "gridColumn22";
            this.gridColumn22.Visible = true;
            this.gridColumn22.VisibleIndex = 1;
            // 
            // gridColumn23
            // 
            this.gridColumn23.Caption = "Tổ nhóm";
            this.gridColumn23.FieldName = "GroupName";
            this.gridColumn23.Name = "gridColumn23";
            this.gridColumn23.Visible = true;
            this.gridColumn23.VisibleIndex = 2;
            // 
            // gridColumn24
            // 
            this.gridColumn24.Caption = "Hình ảnh";
            this.gridColumn24.ColumnEdit = this.rptPhoto;
            this.gridColumn24.FieldName = "Photo";
            this.gridColumn24.Fixed = DevExpress.XtraGrid.Columns.FixedStyle.Left;
            this.gridColumn24.Name = "gridColumn24";
            this.gridColumn24.OptionsColumn.AllowEdit = false;
            this.gridColumn24.OptionsColumn.ReadOnly = true;
            this.gridColumn24.Visible = true;
            this.gridColumn24.VisibleIndex = 3;
            // 
            // gridColumn25
            // 
            this.gridColumn25.Caption = "Mã nhân viên";
            this.gridColumn25.FieldName = "EmployeeCode";
            this.gridColumn25.Fixed = DevExpress.XtraGrid.Columns.FixedStyle.Left;
            this.gridColumn25.Name = "gridColumn25";
            this.gridColumn25.OptionsColumn.AllowEdit = false;
            this.gridColumn25.OptionsColumn.ReadOnly = true;
            this.gridColumn25.Visible = true;
            this.gridColumn25.VisibleIndex = 4;
            this.gridColumn25.Width = 74;
            // 
            // gridColumn26
            // 
            this.gridColumn26.Caption = "Họ lót";
            this.gridColumn26.FieldName = "FirstName";
            this.gridColumn26.Fixed = DevExpress.XtraGrid.Columns.FixedStyle.Left;
            this.gridColumn26.Name = "gridColumn26";
            this.gridColumn26.OptionsColumn.AllowEdit = false;
            this.gridColumn26.OptionsColumn.ReadOnly = true;
            this.gridColumn26.Visible = true;
            this.gridColumn26.VisibleIndex = 5;
            this.gridColumn26.Width = 110;
            // 
            // gridColumn27
            // 
            this.gridColumn27.Caption = "Tên";
            this.gridColumn27.FieldName = "LastName";
            this.gridColumn27.Fixed = DevExpress.XtraGrid.Columns.FixedStyle.Left;
            this.gridColumn27.Name = "gridColumn27";
            this.gridColumn27.OptionsColumn.AllowEdit = false;
            this.gridColumn27.OptionsColumn.ReadOnly = true;
            this.gridColumn27.Visible = true;
            this.gridColumn27.VisibleIndex = 6;
            this.gridColumn27.Width = 66;
            // 
            // gridColumn28
            // 
            this.gridColumn28.Caption = "Giới tính";
            this.gridColumn28.FieldName = "Sex";
            this.gridColumn28.Name = "gridColumn28";
            this.gridColumn28.OptionsColumn.AllowEdit = false;
            this.gridColumn28.OptionsColumn.ReadOnly = true;
            this.gridColumn28.Visible = true;
            this.gridColumn28.VisibleIndex = 7;
            this.gridColumn28.Width = 56;
            // 
            // gridColumn30
            // 
            this.gridColumn30.Caption = "Nơi sinh";
            this.gridColumn30.FieldName = "BirthPlace";
            this.gridColumn30.Name = "gridColumn30";
            this.gridColumn30.OptionsColumn.AllowEdit = false;
            this.gridColumn30.OptionsColumn.ReadOnly = true;
            this.gridColumn30.Visible = true;
            this.gridColumn30.VisibleIndex = 9;
            this.gridColumn30.Width = 111;
            // 
            // gridColumn31
            // 
            this.gridColumn31.Caption = "Điện thoại";
            this.gridColumn31.FieldName = "CellPhone";
            this.gridColumn31.Name = "gridColumn31";
            this.gridColumn31.OptionsColumn.AllowEdit = false;
            this.gridColumn31.OptionsColumn.ReadOnly = true;
            this.gridColumn31.Visible = true;
            this.gridColumn31.VisibleIndex = 10;
            this.gridColumn31.Width = 83;
            // 
            // gridColumn32
            // 
            this.gridColumn32.Caption = "Địa chỉ";
            this.gridColumn32.FieldName = "MainAddress";
            this.gridColumn32.Name = "gridColumn32";
            this.gridColumn32.OptionsColumn.AllowEdit = false;
            this.gridColumn32.OptionsColumn.ReadOnly = true;
            this.gridColumn32.Visible = true;
            this.gridColumn32.VisibleIndex = 11;
            this.gridColumn32.Width = 319;
            // 
            // gridColumn33
            // 
            this.gridColumn33.Caption = "Chức vụ";
            this.gridColumn33.FieldName = "Position";
            this.gridColumn33.Name = "gridColumn33";
            this.gridColumn33.OptionsColumn.AllowEdit = false;
            this.gridColumn33.Visible = true;
            this.gridColumn33.VisibleIndex = 12;
            this.gridColumn33.Width = 139;
            // 
            // gridColumn34
            // 
            this.gridColumn34.Caption = "CMND";
            this.gridColumn34.FieldName = "IDCard";
            this.gridColumn34.Name = "gridColumn34";
            this.gridColumn34.OptionsColumn.AllowEdit = false;
            this.gridColumn34.OptionsColumn.ReadOnly = true;
            this.gridColumn34.Visible = true;
            this.gridColumn34.VisibleIndex = 13;
            this.gridColumn34.Width = 84;
            // 
            // gridColumn35
            // 
            this.gridColumn35.Caption = "Ngày cấp";
            this.gridColumn35.FieldName = "IDCardDate";
            this.gridColumn35.Name = "gridColumn35";
            this.gridColumn35.OptionsColumn.AllowEdit = false;
            this.gridColumn35.OptionsColumn.ReadOnly = true;
            this.gridColumn35.Visible = true;
            this.gridColumn35.VisibleIndex = 14;
            // 
            // gridColumn36
            // 
            this.gridColumn36.Caption = "Nơi cấp";
            this.gridColumn36.FieldName = "IDCardPlace";
            this.gridColumn36.Name = "gridColumn36";
            this.gridColumn36.OptionsColumn.AllowEdit = false;
            this.gridColumn36.OptionsColumn.ReadOnly = true;
            this.gridColumn36.Visible = true;
            this.gridColumn36.VisibleIndex = 15;
            this.gridColumn36.Width = 115;
            // 
            // gridColumn37
            // 
            this.gridColumn37.Caption = "Trạng thái";
            this.gridColumn37.FieldName = "Status";
            this.gridColumn37.Name = "gridColumn37";
            this.gridColumn37.OptionsColumn.AllowEdit = false;
            this.gridColumn37.OptionsColumn.ReadOnly = true;
            this.gridColumn37.Visible = true;
            this.gridColumn37.VisibleIndex = 16;
            // 
            // gridColumn38
            // 
            this.gridColumn38.Caption = "Ngày BD thử việc";
            this.gridColumn38.FieldName = "TestFromDate";
            this.gridColumn38.Name = "gridColumn38";
            this.gridColumn38.OptionsColumn.AllowEdit = false;
            this.gridColumn38.OptionsColumn.ReadOnly = true;
            this.gridColumn38.Visible = true;
            this.gridColumn38.VisibleIndex = 17;
            // 
            // gridColumn39
            // 
            this.gridColumn39.Caption = "Ngày KT thử việc";
            this.gridColumn39.FieldName = "TestToDate";
            this.gridColumn39.Name = "gridColumn39";
            this.gridColumn39.OptionsColumn.AllowEdit = false;
            this.gridColumn39.OptionsColumn.ReadOnly = true;
            this.gridColumn39.Visible = true;
            this.gridColumn39.VisibleIndex = 18;
            // 
            // gridColumn40
            // 
            this.gridColumn40.Caption = "Ngày nghỉ";
            this.gridColumn40.FieldName = "EndDate";
            this.gridColumn40.Name = "gridColumn40";
            this.gridColumn40.OptionsColumn.AllowEdit = false;
            this.gridColumn40.OptionsColumn.ReadOnly = true;
            this.gridColumn40.Visible = true;
            this.gridColumn40.VisibleIndex = 19;
            // 
            // gridColumn1
            // 
            this.gridColumn1.Caption = "Chi nhánh";
            this.gridColumn1.FieldName = "BranchName";
            this.gridColumn1.Name = "gridColumn1";
            this.gridColumn1.Visible = true;
            this.gridColumn1.VisibleIndex = 0;
            // 
            // gridColumn2
            // 
            this.gridColumn2.Caption = "Phòng ban";
            this.gridColumn2.FieldName = "DepartmentName";
            this.gridColumn2.Name = "gridColumn2";
            this.gridColumn2.Visible = true;
            this.gridColumn2.VisibleIndex = 1;
            // 
            // gridColumn3
            // 
            this.gridColumn3.Caption = "Tổ nhóm";
            this.gridColumn3.FieldName = "GroupName";
            this.gridColumn3.Name = "gridColumn3";
            this.gridColumn3.Visible = true;
            this.gridColumn3.VisibleIndex = 2;
            // 
            // gridColumn4
            // 
            this.gridColumn4.Caption = "Hình ảnh";
            this.gridColumn4.ColumnEdit = this.rptPhoto;
            this.gridColumn4.FieldName = "Photo";
            this.gridColumn4.Fixed = DevExpress.XtraGrid.Columns.FixedStyle.Left;
            this.gridColumn4.Name = "gridColumn4";
            this.gridColumn4.OptionsColumn.AllowEdit = false;
            this.gridColumn4.OptionsColumn.ReadOnly = true;
            this.gridColumn4.Visible = true;
            this.gridColumn4.VisibleIndex = 3;
            // 
            // gridColumn5
            // 
            this.gridColumn5.Caption = "Mã nhân viên";
            this.gridColumn5.FieldName = "EmployeeCode";
            this.gridColumn5.Fixed = DevExpress.XtraGrid.Columns.FixedStyle.Left;
            this.gridColumn5.Name = "gridColumn5";
            this.gridColumn5.OptionsColumn.AllowEdit = false;
            this.gridColumn5.OptionsColumn.ReadOnly = true;
            this.gridColumn5.Visible = true;
            this.gridColumn5.VisibleIndex = 4;
            this.gridColumn5.Width = 74;
            // 
            // gridColumn6
            // 
            this.gridColumn6.Caption = "Họ lót";
            this.gridColumn6.FieldName = "FirstName";
            this.gridColumn6.Fixed = DevExpress.XtraGrid.Columns.FixedStyle.Left;
            this.gridColumn6.Name = "gridColumn6";
            this.gridColumn6.OptionsColumn.AllowEdit = false;
            this.gridColumn6.OptionsColumn.ReadOnly = true;
            this.gridColumn6.Visible = true;
            this.gridColumn6.VisibleIndex = 5;
            this.gridColumn6.Width = 110;
            // 
            // gridColumn7
            // 
            this.gridColumn7.Caption = "Tên";
            this.gridColumn7.FieldName = "LastName";
            this.gridColumn7.Fixed = DevExpress.XtraGrid.Columns.FixedStyle.Left;
            this.gridColumn7.Name = "gridColumn7";
            this.gridColumn7.OptionsColumn.AllowEdit = false;
            this.gridColumn7.OptionsColumn.ReadOnly = true;
            this.gridColumn7.Visible = true;
            this.gridColumn7.VisibleIndex = 6;
            this.gridColumn7.Width = 66;
            // 
            // gridColumn8
            // 
            this.gridColumn8.Caption = "Giới tính";
            this.gridColumn8.FieldName = "Sex";
            this.gridColumn8.Name = "gridColumn8";
            this.gridColumn8.OptionsColumn.AllowEdit = false;
            this.gridColumn8.OptionsColumn.ReadOnly = true;
            this.gridColumn8.Visible = true;
            this.gridColumn8.VisibleIndex = 7;
            this.gridColumn8.Width = 56;
            // 
            // gridColumn9
            // 
            this.gridColumn9.Caption = "Ngày sinh";
            this.gridColumn9.FieldName = "Birthday";
            this.gridColumn9.Name = "gridColumn9";
            this.gridColumn9.OptionsColumn.AllowEdit = false;
            this.gridColumn9.OptionsColumn.ReadOnly = true;
            this.gridColumn9.Visible = true;
            this.gridColumn9.VisibleIndex = 8;
            this.gridColumn9.Width = 66;
            // 
            // gridColumn10
            // 
            this.gridColumn10.Caption = "Nơi sinh";
            this.gridColumn10.FieldName = "BirthPlace";
            this.gridColumn10.Name = "gridColumn10";
            this.gridColumn10.OptionsColumn.AllowEdit = false;
            this.gridColumn10.OptionsColumn.ReadOnly = true;
            this.gridColumn10.Visible = true;
            this.gridColumn10.VisibleIndex = 9;
            this.gridColumn10.Width = 111;
            // 
            // gridColumn11
            // 
            this.gridColumn11.Caption = "Điện thoại";
            this.gridColumn11.FieldName = "CellPhone";
            this.gridColumn11.Name = "gridColumn11";
            this.gridColumn11.OptionsColumn.AllowEdit = false;
            this.gridColumn11.OptionsColumn.ReadOnly = true;
            this.gridColumn11.Visible = true;
            this.gridColumn11.VisibleIndex = 10;
            this.gridColumn11.Width = 83;
            // 
            // gridColumn12
            // 
            this.gridColumn12.Caption = "Địa chỉ";
            this.gridColumn12.FieldName = "MainAddress";
            this.gridColumn12.Name = "gridColumn12";
            this.gridColumn12.OptionsColumn.AllowEdit = false;
            this.gridColumn12.OptionsColumn.ReadOnly = true;
            this.gridColumn12.Visible = true;
            this.gridColumn12.VisibleIndex = 11;
            this.gridColumn12.Width = 319;
            // 
            // gridColumn13
            // 
            this.gridColumn13.Caption = "Chức vụ";
            this.gridColumn13.FieldName = "Position";
            this.gridColumn13.Name = "gridColumn13";
            this.gridColumn13.OptionsColumn.AllowEdit = false;
            this.gridColumn13.Visible = true;
            this.gridColumn13.VisibleIndex = 12;
            this.gridColumn13.Width = 139;
            // 
            // gridColumn14
            // 
            this.gridColumn14.Caption = "CMND";
            this.gridColumn14.FieldName = "IDCard";
            this.gridColumn14.Name = "gridColumn14";
            this.gridColumn14.OptionsColumn.AllowEdit = false;
            this.gridColumn14.OptionsColumn.ReadOnly = true;
            this.gridColumn14.Visible = true;
            this.gridColumn14.VisibleIndex = 13;
            this.gridColumn14.Width = 84;
            // 
            // gridColumn15
            // 
            this.gridColumn15.Caption = "Ngày cấp";
            this.gridColumn15.FieldName = "IDCardDate";
            this.gridColumn15.Name = "gridColumn15";
            this.gridColumn15.OptionsColumn.AllowEdit = false;
            this.gridColumn15.OptionsColumn.ReadOnly = true;
            this.gridColumn15.Visible = true;
            this.gridColumn15.VisibleIndex = 14;
            // 
            // gridColumn16
            // 
            this.gridColumn16.Caption = "Nơi cấp";
            this.gridColumn16.FieldName = "IDCardPlace";
            this.gridColumn16.Name = "gridColumn16";
            this.gridColumn16.OptionsColumn.AllowEdit = false;
            this.gridColumn16.OptionsColumn.ReadOnly = true;
            this.gridColumn16.Visible = true;
            this.gridColumn16.VisibleIndex = 15;
            this.gridColumn16.Width = 115;
            // 
            // gridColumn17
            // 
            this.gridColumn17.Caption = "Trạng thái";
            this.gridColumn17.FieldName = "Status";
            this.gridColumn17.Name = "gridColumn17";
            this.gridColumn17.OptionsColumn.AllowEdit = false;
            this.gridColumn17.OptionsColumn.ReadOnly = true;
            this.gridColumn17.Visible = true;
            this.gridColumn17.VisibleIndex = 16;
            // 
            // gridColumn18
            // 
            this.gridColumn18.Caption = "Ngày BD thử việc";
            this.gridColumn18.FieldName = "TestFromDate";
            this.gridColumn18.Name = "gridColumn18";
            this.gridColumn18.OptionsColumn.AllowEdit = false;
            this.gridColumn18.OptionsColumn.ReadOnly = true;
            this.gridColumn18.Visible = true;
            this.gridColumn18.VisibleIndex = 17;
            // 
            // gridColumn19
            // 
            this.gridColumn19.Caption = "Ngày KT thử việc";
            this.gridColumn19.FieldName = "TestToDate";
            this.gridColumn19.Name = "gridColumn19";
            this.gridColumn19.OptionsColumn.AllowEdit = false;
            this.gridColumn19.OptionsColumn.ReadOnly = true;
            this.gridColumn19.Visible = true;
            this.gridColumn19.VisibleIndex = 18;
            // 
            // gridColumn20
            // 
            this.gridColumn20.Caption = "Ngày nghỉ";
            this.gridColumn20.FieldName = "EndDate";
            this.gridColumn20.Name = "gridColumn20";
            this.gridColumn20.OptionsColumn.AllowEdit = false;
            this.gridColumn20.OptionsColumn.ReadOnly = true;
            this.gridColumn20.Visible = true;
            this.gridColumn20.VisibleIndex = 19;
            // 
            // barManager1
            // 
            this.barManager1.Bars.AddRange(new DevExpress.XtraBars.Bar[] {
            this.bar1});
            this.barManager1.DockControls.Add(this.barDockControlTop);
            this.barManager1.DockControls.Add(this.barDockControlBottom);
            this.barManager1.DockControls.Add(this.barDockControlLeft);
            this.barManager1.DockControls.Add(this.barDockControlRight);
            this.barManager1.Form = this;
            this.barManager1.Images = this.imageCollection2;
            this.barManager1.Items.AddRange(new DevExpress.XtraBars.BarItem[] {
            this.bbiAddEmployee,
            this.bbiEdit,
            this.bbiDelete,
            this.bbiPrint,
            this.bbiRefresh,
            this.bbiClose,
            this.bbiExport,
            this.bbiFilter,
            this.bbeBeginDate,
            this.bbeEndDate});
            this.barManager1.MaxItemId = 32;
            this.barManager1.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
            this.repositoryItemImageComboBox1,
            this.repBeginDate,
            this.repEndDate});
            // 
            // bar1
            // 
            this.bar1.BarName = "Tools";
            this.bar1.DockCol = 0;
            this.bar1.DockRow = 0;
            this.bar1.DockStyle = DevExpress.XtraBars.BarDockStyle.Top;
            this.bar1.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] {
            new DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, this.bbiAddEmployee, "", true, true, true, 0, null, DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph),
            new DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, this.bbiEdit, DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph),
            new DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, this.bbiDelete, DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph),
            new DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, this.bbiFilter, "", true, true, true, 0, null, DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph),
            new DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, this.bbeBeginDate, "", true, true, true, 0, null, DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph),
            new DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, this.bbeEndDate, DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph),
            new DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, this.bbiPrint, "", true, true, true, 0, null, DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph),
            new DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, this.bbiExport, DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph),
            new DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, this.bbiRefresh, "", true, true, true, 0, null, DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph),
            new DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, this.bbiClose, DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph)});
            this.bar1.OptionsBar.UseWholeRow = true;
            this.bar1.Text = "Tools";
            // 
            // bbiAddEmployee
            // 
            this.bbiAddEmployee.Caption = "Thêm Công Việc";
            this.bbiAddEmployee.Id = 3;
            this.bbiAddEmployee.ImageIndex = 66;
            this.bbiAddEmployee.Name = "bbiAddEmployee";
            this.bbiAddEmployee.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.bbiAddWork_ItemClick);
            // 
            // bbiEdit
            // 
            this.bbiEdit.Caption = "Sửa";
            this.bbiEdit.Id = 4;
            this.bbiEdit.ImageIndex = 14;
            this.bbiEdit.Name = "bbiEdit";
            this.bbiEdit.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.bbiEdit_ItemClick);
            // 
            // bbiDelete
            // 
            this.bbiDelete.Caption = "Xóa";
            this.bbiDelete.Id = 5;
            this.bbiDelete.ImageIndex = 13;
            this.bbiDelete.Name = "bbiDelete";
            this.bbiDelete.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.bbiDelete_ItemClick);
            // 
            // bbiFilter
            // 
            this.bbiFilter.Caption = "Lọc:";
            this.bbiFilter.Edit = this.repositoryItemImageComboBox1;
            this.bbiFilter.Id = 10;
            this.bbiFilter.Name = "bbiFilter";
            this.bbiFilter.Width = 120;
            // 
            // repositoryItemImageComboBox1
            // 
            this.repositoryItemImageComboBox1.Appearance.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold);
            this.repositoryItemImageComboBox1.Appearance.Options.UseFont = true;
            this.repositoryItemImageComboBox1.AutoHeight = false;
            this.repositoryItemImageComboBox1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
            this.repositoryItemImageComboBox1.Items.AddRange(new DevExpress.XtraEditors.Controls.ImageComboBoxItem[] {
            new DevExpress.XtraEditors.Controls.ImageComboBoxItem("<Tất cả>", 0, -1),
            new DevExpress.XtraEditors.Controls.ImageComboBoxItem("<Theo thời gian>", 1, -1)});
            this.repositoryItemImageComboBox1.Name = "repositoryItemImageComboBox1";
            // 
            // bbeBeginDate
            // 
            this.bbeBeginDate.Caption = "Từ ngày:";
            this.bbeBeginDate.Edit = this.repBeginDate;
            this.bbeBeginDate.Id = 30;
            this.bbeBeginDate.Name = "bbeBeginDate";
            this.bbeBeginDate.Width = 80;
            // 
            // repBeginDate
            // 
            this.repBeginDate.AutoHeight = false;
            this.repBeginDate.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
            this.repBeginDate.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton()});
            this.repBeginDate.Name = "repBeginDate";
            // 
            // bbeEndDate
            // 
            this.bbeEndDate.Caption = "Đến ngày:";
            this.bbeEndDate.Edit = this.repEndDate;
            this.bbeEndDate.Id = 31;
            this.bbeEndDate.Name = "bbeEndDate";
            this.bbeEndDate.Width = 80;
            // 
            // repEndDate
            // 
            this.repEndDate.AutoHeight = false;
            this.repEndDate.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
            this.repEndDate.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton()});
            this.repEndDate.Name = "repEndDate";
            // 
            // bbiPrint
            // 
            this.bbiPrint.Caption = "In";
            this.bbiPrint.Id = 6;
            this.bbiPrint.ImageIndex = 9;
            this.bbiPrint.Name = "bbiPrint";
            this.bbiPrint.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.bbiPrint_ItemClick);
            // 
            // bbiExport
            // 
            this.bbiExport.Caption = "Xuất";
            this.bbiExport.Id = 9;
            this.bbiExport.ImageIndex = 49;
            this.bbiExport.Name = "bbiExport";
            this.bbiExport.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.bbiExport_ItemClick);
            // 
            // bbiRefresh
            // 
            this.bbiRefresh.Caption = "Nạp Lại";
            this.bbiRefresh.Id = 7;
            this.bbiRefresh.ImageIndex = 42;
            this.bbiRefresh.Name = "bbiRefresh";
            this.bbiRefresh.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.bbiRefresh_ItemClick);
            // 
            // bbiClose
            // 
            this.bbiClose.Caption = "Đóng";
            this.bbiClose.Id = 8;
            this.bbiClose.ImageIndex = 22;
            this.bbiClose.Name = "bbiClose";
            this.bbiClose.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.bbiClose_ItemClick);
            // 
            // barDockControlTop
            // 
            this.barDockControlTop.CausesValidation = false;
            this.barDockControlTop.Dock = System.Windows.Forms.DockStyle.Top;
            this.barDockControlTop.Location = new System.Drawing.Point(0, 0);
            this.barDockControlTop.Size = new System.Drawing.Size(985, 29);
            // 
            // barDockControlBottom
            // 
            this.barDockControlBottom.CausesValidation = false;
            this.barDockControlBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
            this.barDockControlBottom.Location = new System.Drawing.Point(0, 623);
            this.barDockControlBottom.Size = new System.Drawing.Size(985, 0);
            // 
            // barDockControlLeft
            // 
            this.barDockControlLeft.CausesValidation = false;
            this.barDockControlLeft.Dock = System.Windows.Forms.DockStyle.Left;
            this.barDockControlLeft.Location = new System.Drawing.Point(0, 29);
            this.barDockControlLeft.Size = new System.Drawing.Size(0, 594);
            // 
            // barDockControlRight
            // 
            this.barDockControlRight.CausesValidation = false;
            this.barDockControlRight.Dock = System.Windows.Forms.DockStyle.Right;
            this.barDockControlRight.Location = new System.Drawing.Point(985, 29);
            this.barDockControlRight.Size = new System.Drawing.Size(0, 594);
            // 
            // imageCollection2
            // 
            //this.imageCollection2.ImageStream = ((DevExpress.Utils.ImageCollectionStreamer)(resources.GetObject("imageCollection2.ImageStream")));
            // 
            // layoutControl1
            // 
            this.layoutControl1.Controls.Add(this.imglsEmployee);
            this.layoutControl1.Controls.Add(this.mmDescription);
            this.layoutControl1.Controls.Add(this.panelControl1);
            this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.layoutControl1.Location = new System.Drawing.Point(0, 0);
            this.layoutControl1.Name = "layoutControl1";
            this.layoutControl1.Root = this.layoutControlGroup1;
            this.layoutControl1.Size = new System.Drawing.Size(254, 594);
            this.layoutControl1.TabIndex = 4;
            this.layoutControl1.Text = "layoutControl1";
            // 
            // imglsEmployee
            // 
            this.imglsEmployee.HighlightedItemStyle = DevExpress.XtraEditors.HighlightStyle.Skinned;
            this.imglsEmployee.ImageList = this.imgList;
            this.imglsEmployee.Location = new System.Drawing.Point(4, 306);
            this.imglsEmployee.Name = "imglsEmployee";
            this.imglsEmployee.Size = new System.Drawing.Size(246, 244);
            this.imglsEmployee.StyleController = this.layoutControl1;
            this.imglsEmployee.TabIndex = 7;
            // 
            // imgList
            // 
            //this.imgList.ImageStream = ((DevExpress.Utils.ImageCollectionStreamer)(resources.GetObject("imgList.ImageStream")));
            // 
            // mmDescription
            // 
            this.mmDescription.Location = new System.Drawing.Point(4, 20);
            this.mmDescription.MenuManager = this.barManager1;
            this.mmDescription.Name = "mmDescription";
            this.mmDescription.Properties.ReadOnly = true;
            this.mmDescription.Size = new System.Drawing.Size(246, 266);
            this.mmDescription.StyleController = this.layoutControl1;
            this.mmDescription.TabIndex = 4;
            // 
            // panelControl1
            // 
            this.panelControl1.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
            this.panelControl1.Controls.Add(this.bbiDeleteEmployee);
            this.panelControl1.Controls.Add(this.bbiSelect);
            this.panelControl1.Location = new System.Drawing.Point(4, 554);
            this.panelControl1.Name = "panelControl1";
            this.panelControl1.Size = new System.Drawing.Size(246, 36);
            this.panelControl1.TabIndex = 6;
            // 
            // bbiDeleteEmployee
            // 
            this.bbiDeleteEmployee.ImageIndex = 13;
            this.bbiDeleteEmployee.ImageList = this.imageCollection2;
            this.bbiDeleteEmployee.Location = new System.Drawing.Point(93, 6);
            this.bbiDeleteEmployee.Name = "bbiDeleteEmployee";
            this.bbiDeleteEmployee.Size = new System.Drawing.Size(75, 23);
            this.bbiDeleteEmployee.TabIndex = 1;
            this.bbiDeleteEmployee.Text = "Xóa";
            this.bbiDeleteEmployee.Click += new System.EventHandler(this.bbiDeleteEmployee_Click);
            // 
            // bbiSelect
            // 
            this.bbiSelect.ImageIndex = 39;
            this.bbiSelect.ImageList = this.imageCollection2;
            this.bbiSelect.Location = new System.Drawing.Point(8, 6);
            this.bbiSelect.Name = "bbiSelect";
            this.bbiSelect.Size = new System.Drawing.Size(75, 23);
            this.bbiSelect.TabIndex = 0;
            this.bbiSelect.Text = "Chọn ...";
            this.bbiSelect.Click += new System.EventHandler(this.bbiSelect_Click);
            // 
            // layoutControlGroup1
            // 
            this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1";
            this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
            this.layoutControlGroup1.GroupBordersVisible = false;
            this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
            this.layoutControlItem2,
            this.layoutControlItem3,
            this.layoutControlItem1});
            this.layoutControlGroup1.Location = new System.Drawing.Point(0, 0);
            this.layoutControlGroup1.Name = "layoutControlGroup1";
            this.layoutControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 2, 2);
            this.layoutControlGroup1.Size = new System.Drawing.Size(254, 594);
            this.layoutControlGroup1.Text = "layoutControlGroup1";
            this.layoutControlGroup1.TextVisible = false;
            // 
            // layoutControlItem2
            // 
            this.layoutControlItem2.AllowHtmlStringInCaption = true;
            this.layoutControlItem2.Control = this.mmDescription;
            this.layoutControlItem2.CustomizationFormText = "<b>Thông tin liên quan:</b>";
            this.layoutControlItem2.Location = new System.Drawing.Point(0, 0);
            this.layoutControlItem2.Name = "layoutControlItem2";
            this.layoutControlItem2.Size = new System.Drawing.Size(250, 286);
            this.layoutControlItem2.Text = "<b>Thông tin liên quan:</b>";
            this.layoutControlItem2.TextLocation = DevExpress.Utils.Locations.Top;
            this.layoutControlItem2.TextSize = new System.Drawing.Size(157, 13);
            // 
            // layoutControlItem3
            // 
            this.layoutControlItem3.Control = this.panelControl1;
            this.layoutControlItem3.CustomizationFormText = "layoutControlItem3";
            this.layoutControlItem3.Location = new System.Drawing.Point(0, 550);
            this.layoutControlItem3.MaxSize = new System.Drawing.Size(0, 40);
            this.layoutControlItem3.MinSize = new System.Drawing.Size(104, 40);
            this.layoutControlItem3.Name = "layoutControlItem3";
            this.layoutControlItem3.Size = new System.Drawing.Size(250, 40);
            this.layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
            this.layoutControlItem3.Text = "layoutControlItem3";
            this.layoutControlItem3.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize;
            this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
            this.layoutControlItem3.TextToControlDistance = 0;
            this.layoutControlItem3.TextVisible = false;
            // 
            // layoutControlItem1
            // 
            this.layoutControlItem1.AllowHtmlStringInCaption = true;
            this.layoutControlItem1.Control = this.imglsEmployee;
            this.layoutControlItem1.CustomizationFormText = "<b>Những người cùng tham gia:</b>";
            this.layoutControlItem1.Location = new System.Drawing.Point(0, 286);
            this.layoutControlItem1.Name = "layoutControlItem1";
            this.layoutControlItem1.Size = new System.Drawing.Size(250, 264);
            this.layoutControlItem1.Text = "<b>Những người cùng tham gia:</b>";
            this.layoutControlItem1.TextLocation = DevExpress.Utils.Locations.Top;
            this.layoutControlItem1.TextSize = new System.Drawing.Size(157, 13);
            // 
            // splitContainerControl1
            // 
            this.splitContainerControl1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.splitContainerControl1.FixedPanel = DevExpress.XtraEditors.SplitFixedPanel.Panel2;
            this.splitContainerControl1.Location = new System.Drawing.Point(0, 29);
            this.splitContainerControl1.Name = "splitContainerControl1";
            this.splitContainerControl1.Panel1.Controls.Add(this.gcList);
            this.splitContainerControl1.Panel1.Text = "Panel1";
            this.splitContainerControl1.Panel2.Controls.Add(this.layoutControl1);
            this.splitContainerControl1.Panel2.Text = "Panel2";
            this.splitContainerControl1.Size = new System.Drawing.Size(985, 594);
            this.splitContainerControl1.SplitterPosition = 254;
            this.splitContainerControl1.TabIndex = 5;
            this.splitContainerControl1.Text = "splitContainerControl1";
            // 
            // xucWork
            // 
            this.Controls.Add(this.splitContainerControl1);
            this.Controls.Add(this.barDockControlLeft);
            this.Controls.Add(this.barDockControlRight);
            this.Controls.Add(this.barDockControlBottom);
            this.Controls.Add(this.barDockControlTop);
            this.Name = "xucWork";
            this.Size = new System.Drawing.Size(985, 623);
            ((System.ComponentModel.ISupportInitialize)(this.gcList)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.gbList)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.repStatus)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.repComplete)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.repCal)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.rptPhoto)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.cvList)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.barManager1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.repositoryItemImageComboBox1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.repBeginDate.CalendarTimeProperties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.repBeginDate)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.repEndDate.CalendarTimeProperties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.repEndDate)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.imageCollection2)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
            this.layoutControl1.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.imglsEmployee)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.imgList)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.mmDescription.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.panelControl1)).EndInit();
            this.panelControl1.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1)).EndInit();
            this.splitContainerControl1.ResumeLayout(false);
            this.ResumeLayout(false);

        }

        private void LoadFocusedData()
        {
            try
            {
                this.mmDescription.Text = "C\x00f4ng việc: " + Environment.NewLine + this.gbList.GetFocusedRowCellValue(this.colWork).ToString() + Environment.NewLine + Environment.NewLine + "Ghi ch\x00fa: " + Environment.NewLine + this.gbList.GetFocusedRowCellValue(this.colDescription).ToString();
                this.imglsEmployee.Items.Clear();
                string employeeCode = this.gbList.GetFocusedRowCellValue(this.colEmployeeCode).ToString();
                HRM_EMPLOYEE hrm_employee = new HRM_EMPLOYEE();
                hrm_employee.Get(employeeCode);
                if (!hrm_employee.Sex)
                {
                    this.imglsEmployee.Items.Add(hrm_employee.FirstName + " " + hrm_employee.LastName + " (" + employeeCode + ") - Trưởng nh\x00f3m", 1);
                }
                else
                {
                    this.imglsEmployee.Items.Add(hrm_employee.FirstName + " " + hrm_employee.LastName + " (" + employeeCode + ") - Trưởng nh\x00f3m", 0);
                }
                this.m_WorkID = new Guid(this.gbList.GetFocusedRowCellValue(this.colWorkID).ToString());
                HRM_WORK_EMPLOYEE hrm_work_employee = new HRM_WORK_EMPLOYEE();
                foreach (DataRow row in hrm_work_employee.GetList(this.m_WorkID).Rows)
                {
                    if (!bool.Parse(row["Sex"].ToString()))
                    {
                        this.imglsEmployee.Items.Add(row["FirstName"].ToString() + " " + row["LastName"].ToString() + " (" + row["EmployeeCode"].ToString() + ")", 1);
                    }
                    else
                    {
                        this.imglsEmployee.Items.Add(row["FirstName"].ToString() + " " + row["LastName"].ToString() + " (" + row["EmployeeCode"].ToString() + ")", 0);
                    }
                }
            }
            catch
            {
            }
            if (this.xucSelect != null)
            {
                this.splitContainerControl1.Panel2.Controls.Remove(this.xucSelect);
                this.xucSelect = null;
            }
        }

        private void LoadGrid()
        {
            HRM_WORK hrm_work = new HRM_WORK();
            if (this.m_IndexKey == 0)
            {
                this.gcList.DataSource = hrm_work.GetList();
            }
            else
            {
                this.gcList.DataSource = hrm_work.GetListByDate(System.DateTime.Parse(this.bbeBeginDate.EditValue.ToString()), System.DateTime.Parse(this.bbeEndDate.EditValue.ToString()));
            }
        }

        private void RaiseClosedHander()
        {
            if (this.Closed != null)
            {
                this.Closed(this);
            }
        }

        private void ReLoad()
        {
            base.SetWaitDialogCaption("Đang nạp dữ liệu...");
            this.m_IndexKey = 1;
            this.bbiFilter.EditValue = 1;
            this.bbiFilter.EditValueChanged += new EventHandler(this.bbiFilter_EditValueChanged);
            this.bbeBeginDate.EditValueChanged += (s, e) => this.LoadGrid();
            this.bbeEndDate.EditValueChanged += (s, e) => this.LoadGrid();
            this.LoadGrid();
        }

        private void SetMenu(Common.Class.RowClickEventArgs e)
        {
            object rowCellValue = this.gbList.GetRowCellValue(this.gbList.FocusedRowHandle, "WorkID");
            this.DisableMenu(false);
            if (rowCellValue == null)
            {
                this.DisableMenu(true);
            }
        }

        private void ucList_ListKeyDown(object sender, KeyEventArgs key)
        {
            if (key.KeyCode == Keys.F2)
            {
                if (this.gbList.RowCount != 0)
                {
                    this.Change();
                }
            }
            else if ((key.KeyCode == Keys.Control) | (key.KeyCode == Keys.E))
            {
                if (this.gbList.RowCount != 0)
                {
                    this.Change();
                }
            }
            else if (key.KeyCode == Keys.Enter)
            {
                if (this.gbList.RowCount != 0)
                {
                    this.Change();
                }
            }
            else if (key.KeyCode == Keys.F5)
            {
                this.ReLoad();
            }
            else if ((key.KeyCode == Keys.Control) | (key.KeyCode == Keys.N))
            {
                this.Add();
            }
            else if ((key.KeyCode == Keys.Control) | (key.KeyCode == Keys.T))
            {
                this.Add();
            }
        }

        private void UpdateRow(HRM_WORK item)
        {
            GridView gbList = this.gbList;
            int focusedRowHandle = this.gbList.FocusedRowHandle;
            gbList.SetRowCellValue(focusedRowHandle, "WorkID", item.WorkID);
            gbList.SetRowCellValue(focusedRowHandle, "EmployeeCode", item.EmployeeCode);
            gbList.SetRowCellValue(focusedRowHandle, "EmployeeName", item.EmployeeName);
            gbList.SetRowCellValue(focusedRowHandle, "Deliverer", item.Deliverer);
            gbList.SetRowCellValue(focusedRowHandle, "DelivererName", item.DelivererName);
            gbList.SetRowCellValue(focusedRowHandle, "Work", item.Work);
            gbList.SetRowCellValue(focusedRowHandle, "Priority", item.Priority);
            gbList.SetRowCellValue(focusedRowHandle, "BeginDate", item.BeginDate);
            gbList.SetRowCellValue(focusedRowHandle, "EndDate", item.EndDate);
            gbList.SetRowCellValue(focusedRowHandle, "Status", item.Status);
            gbList.SetRowCellValue(focusedRowHandle, "Complete", item.Complete);
            gbList.SetRowCellValue(focusedRowHandle, "Cost", item.Cost);
            gbList.SetRowCellValue(focusedRowHandle, "Description", item.Description);
            gbList.UpdateCurrentRow();
        }

        public delegate void ClosedHander(object sender);
    }
}

